The present invention generally relates to an image recognition apparatus used, for example, in factories and plants, and more particularly, to a pattern recognizing apparatus adapted to classify objects such as components through pattern matching of shape feature values of images.
A conventional pattern recognizing apparatus performs pattern recognition as follows. The average value of a shape feature value of reference patterns, such as an area, peripheral length or secondary moment of each reference pattern, and a respective standard deviation are obtained in advance. Then, the shape feature value of an image of the pattern of an object to be recognized is calculated and compared with that of the reference pattern, whereby the object is recognized.
The conventional pattern recognizing apparatus is based on the assumption that each kind of shape feature value varies in a normal distribution. However, in actuality, the variation of the shape feature value does not always assume a normal distribution. Therefore, the conventional apparatus often is unable to recognize certain patterns or often erroneously recognizes certain patterns.
Meanwhile, the present applicant has previously proposed a pattern recognizing apparatus utilizing fuzzy inference. This pattern recognizing apparatus will be described with reference to FIG. 5.
In FIG. 5, reference numeral 21 denotes a calculating means for calculating shape feature values of input images; 22 denotes a pattern deciding means; 23a-23n denote calculating means for calculating an acceptance of fit of respective rules thereof; and 24 denotes a rule selecting means for selecting a rule having a maximum acceptance of fit.
Initially, the calculating means 21 calculates shape feature values of an input image. More specifically, it calculates the shape feature value of each of suitably set image sections of the input image. The shape feature value of each section is input to the pattern deciding means 22, where a decision is made as to whether the input image is of an object to be recognized.
A plurality of production rules (IF-THEN rules) are set corresponding respectively to patterns of objects to be recognized in the pattern deciding means 22. The overall acceptance of fit of each production rule relative to the input shape feature values is obtained by fuzzy inference using membership functions provided in the condition part of each production rule for each input shape feature value. A rule having the maximum acceptance of fit is decided as corresponding to the subject pattern identified in the action part of the production rule.
In other words, the acceptance of fit of each membership function of each rule is obtained in the calculating means 23a-23n based on the output value of each membership function relative to the input shape feature values, and the overall acceptance of fit of a rule is found by summing the acceptance of fit of the membership functions of the rule.
Alternately, the minimum acceptance of fit of the membership functions of a rule may be designated as the overall acceptance of fit of the rule, or the acceptance of fit of the membership functions of a rule may be multiplied together to obtain the overall acceptance of fit of the rule.
Subsequently, the rule selecting means 24 selects the rule having the maximum overall acceptance of fit from among those obtained in the calculating means 23a-23n. The subject rule, i.e., the subject pattern is decided in the above-described manner.
In the above pattern recognizing apparatus, it is necessary to form the most suitable membership functions in order to realize optimum pattern recognition. However, forming of the membership functions based on the intuition and experience of a system designer is overly troublesome and inconvenient.